<template>
  <van-skeleton title :row="3" v-if="images.length == 0" />
  <div class="box" v-else>
    <van-nav-bar title="标题" :fixed="true" />
    <div class="main">
      <search></search>

      <van-swipe :autoplay="3000" lazy-render>
        <van-swipe-item v-for="image in images" :key="image">
          <img :src="image" />
        </van-swipe-item>
      </van-swipe>
    </div>
  </div>
</template>

<script setup>
import {ref} from "vue";
import { swiperdataApi } from "@/api/api";
import search from "@/components/search.vue";
let images=ref([]);
const swiper=()=>{
  swiperdataApi().then((res)=>{
  console.log(res.data.message);
    images.value=res.data.message
  })
}
swiper();

</script>

<style lang="scss" scoped></style>
